1. Field of the Invention
The present invention relates to an image processing device and method for compression encoding of image information, and in particular, using a generalized block truncation coding (GBTC) method.
2. Description of the Related Art
In recent years the GBTC method has been proposed as a method for compressing and expanding document image data. The GBTC method executes processing to allocate image data of a document into blocks having a predetermined number of pixels, and compresses each block. Specifically, the pixel data within each block are quantized at a lower gradient level using gradient range exponent LD and mean value information LA calculated from the image data within each block. That is, the image data are converted to code data .o slashed.ij obtained by quantization, with the result that the data quantity is compressed. Mean value information LA equally divides the sum of mean value Q1 of image data less than parameter P1 determined by image data within the block, and mean value Q4 of image data greater than parameter P1 (where P1&lt;P2). Gradient range exponent LD is the difference between mean value Q4 and mean value Q1.
FIG. 1 illustrates the flow of the coding process using a typical GBTC method. First, the image data of the document image are divided into blocks of 4.times.4 pixels, as shown in FIG. 1(a). Then the image data of each allocated block are extracted, and the image data of each extracted block are subjected to an encoding process using the GBTC method. Each image data has a data quantity of 1 byte (1 byte=8 bits=256 halftones). In the encoding process using the GBTC method, data of 16-pixel blocks (i.e., 1.times.16 bytes=128 bits) within the allocated block are encoded (compressed) in 4-bytes of code data, 1-byte gradient range exponent LD, and 1-byte mean value information LA, as shown in FIG. 1(b). The 4-bytes of code data are obtained by sorting and allocating the data of each pixel in 4-levels (quantizing). That is, 2-bit code data become 4-bytes in the 16-pixel block.
As a result, the image data (16 bytes) within a single block are encoded as 6-byte (48-bit) data. That is, the quantity of data of an image is compressed to 3/8.
FIG. 1(c) shows the data quantity of coded image data corresponding to a 6-pixel block of image data before encoding. Decoding of the encoded data is executed by calculating the image data (1 byte) corresponding to each code data (2 bits) based on the gradient range exponent LD and mean value information LA.
The image data of the 16 pixels Xij (i.e., i,j=1, 2, 3, 4) within the 4.times.4-pixel block are replaced by the four types of data (1 byte) among the 256 halftones via the decoding process. The decoded data contain obvious errors when compared to the data of the original document image. These errors are difficult to discern, however, due to the limitations of human visual acuity. That is, there is virtually no discernable loss of image quality in normal images.
Parameters Q1 and Q4 can be determined from the gradient range exponent LD and mean value information LA contained in the coded data. That is, a text image comprising a black color portion below parameter P1 and white color portion above parameter P2 can be reproduced from the coded data.
In the JPEG (Joint Photographic Experts Group) method of Huffman coding of data obtained by DCT (discrete cosine transform) conversion of image data, the data compression rate varies depending on the type of document. That is, although the JPEG method may realize a higher rate of data compression than the GBTC method on a particular document, the JPEG method may not be capable of any compression of another document. Thus, it is difficult to set the capacity of installed memory in image forming apparatuses using the JPEG method. On the other hand, the GBTC method is capable of compressing data at a normally constant compression rate. Therefore, image forming apparatuses using the GBTC method are advantageous in that the capacity of installed memory can be readily set.
Digital full color copying machines are often provided with a reduction series copying function for a plurality of image formations on a single sheet. When forming a plurality of reduced images, image information subjected to a reduction process is output a plurality of times in a main scan direction. Furthermore, when forming a plurality of reduced images, magnification is changed by changing the scanning speed in a subscan direction, and repeating a plurality of image forming processes on the same sheet.
In copying machines provided with a reduction series copy function, an image quality monitoring function is provided to monitor the quality of the image actually formed on paper by changing the various image forming conditions relative to a plurality of images formed on a single sheet. Copying machines provided with this image quality monitoring function execute, in addition to processing related to reduction series copying, other processing for switching the gamma table for each output of reduced image output of a single screen.
In the execution of the aforesaid reduction series copy function and image quality monitoring function, a mechanism for executing electrical variable magnification in the main scan direction and a function for outputting image data a plurality of times in the main scan direction must be provided. It is further necessary to provide a mechanism for controlling the scanning speed for processing in the subscan direction, and a separate control mechanism for the plurality of executions of the image forming process for a single sheet. When executing repeated image forming processes for the same sheet, the images formed on the sheet cannot be fixed until all image forming processes have ended. Therefore, variations in image quality may occur among the initially formed images and the last formed images on the sheet. Furthermore, problems arise in accelerated deterioration of the apparatus due to the repeated image forming processes on the single sheet.